﻿using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel.DataAnnotations;
using internal_website.Meta;
using internal_website.Models.Resources;

namespace internal_website.Models
{
    public class Composer : IComposer
    {
        #region Constructor

        public Composer()
        {
            Compositions = new Collection<Composition>();
        }

        #endregion

        [Key]
        public int Id { get; set; }
        public bool Active { get; set; }

/**/
        #region Localized display and model validation attributes
        [Display(Name = "Composer_FirstName_Display_Name", Prompt = "Composer_FirstName_Display_Prompt", ResourceType = typeof(ValidationStrings))]
        [Required(ErrorMessageResourceName = "Composer_FirstName_Required", ErrorMessageResourceType = typeof(ValidationStrings))]
        [LocalizedRegex("_Name_LocalizedRegex_Pattern", "Composer_FirstName_LocalizedRegex_ErrorMessage", errorMessageResourceType: typeof(ValidationStrings))]
        #endregion
        public string FirstName { get; set; }

        #region Localized display and model validation attributes
        [Display(Name = "Composer_LastName_Display_Name", Prompt = "Composer_LastName_Display_Prompt", ResourceType = typeof(ValidationStrings))]
        [Required(ErrorMessageResourceName = "Composer_LastName_Required", ErrorMessageResourceType = typeof(ValidationStrings))]
        [LocalizedRegex("_Name_LocalizedRegex_Pattern", "Composer_LastName_LocalizedRegex_ErrorMessage", errorMessageResourceType: typeof(ValidationStrings))]
        #endregion
        public string LastName { get; set; }

        #region Navigation properties

        public virtual ICollection<Composition> Compositions { get; set; }

        #endregion

    }
}